Skip to content

How to use input in Python?

#Collecting The Input As A Variable:#
name = input('Please enter your name: ')
#Printing The Variable:#
print(name)
#Checking The Variable And Printing Accordingly:#
if name == 'Joe':
  print('Joe Mama')
See also  How to remove integer from string in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.