what is the difference between argv and raw_input? #python

argv vs raw_input

when i use argv in the code i should provide argument in the prompt before i start executing the program, whereas in raw_input i can actually provide the input at the runtime, that is, if i want to collect dynamic entry like “what is the current time” then raw_input would be good, but if my code just require me to enter the date for the day, i may provide through argv itself.

so we will make sure our program wont wait for anything.

raw_input is like a pause button for the program, it will wait till the input is provided and argv just got the requirement input upfront in the command prompt itself and get the work done. so we can go do some tweet update meantime. :)

hope this explains the difference between argv and raw_input.

15Pingbacks & Trackbacks on what is the difference between argv and raw_input? #python

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>