26.Python User Input
26.Python User Input
Example
Python 2.7
In [2]: username = raw_input("Enter username:")
print("Username is: " + username)
------------------------------------------------------------------------
---
NameError Traceback (most recent call la
st)
Cell In[2], line 1
----> 1 username = raw_input("Enter username:")
2 print("Username is: " + username)
Python stops executing when it comes to the input() function, and continues
when the user has given some input