Concatenate more than one input variable including other print function content.
Here is the code to concatenate .
myName = input("What's your name? ")
myLunch = input("What are you having for lunch? ")
print(myName, "is going to be chowing down on", myLunch, "very soon!")
myLunch = input("What are you having for lunch? ")
print(myName, "is going to be chowing down on", myLunch, "very soon!")
- It turns out print has a super-power. We can give it as many different things to print as we want. All we need to do is put a comma( ,) between every different thing in the ().
No comments:
Post a Comment