>>> type(sys.argv) <class 'list'>Iterating over a string returns each letter.
for element in sys.argv:
should do it.
How to iterate over command line arguments?
|
|
Messages In This Thread |
How to iterate over command line arguments? - by zBernie - Nov-20-2018, 02:42 AM
RE: How to iterate over command line arguments? - by ichabod801 - Nov-20-2018, 03:20 AM
RE: How to iterate over command line arguments? - by zBernie - Nov-20-2018, 03:55 AM
RE: How to iterate over command line arguments? - by wavic - Nov-20-2018, 07:01 AM
RE: How to iterate over command line arguments? - by zBernie - Nov-23-2018, 05:00 AM
RE: How to iterate over command line arguments? - by wavic - Nov-23-2018, 04:34 PM
|