Question: my _ ints = sys . argv [ 1 : ] The above my _ ints a list - type variable which contain numbers that

my_ints = sys.argv[1:]
The above my_ints a list-type variable which contain numbers that are string-typed (ex.['1','2','3','4','5'])
Create a program, comprehension.py. Your program should:
Convert these string-type integers into integer-type.
If the number within the list is divisible by 3, multiply it by 10, then replace it.
For example:
If your my_ints =['1','2','3','4','5'], your output should be [1,2,30,4,5]
If your my_ints =['3','30','1','15','10'], your output should be [30,300,1,150,10]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!