+ 3

Spam and eggs...what's this.

Python code often contains references to the comedy group Monty Python. This is why the words, "spam" and "eggs" are often used as placeholder variables in Python where "foo" and "bar" would be used in other programming languages. I didn't get all these lines... please clear this.

28th Jul 2020, 11:18 AM
Abhishek Kumar
Abhishek Kumar - avatar
9 odpowiedzi
+ 13
I also had this doubt and I was really helped. Monty python was a British comedy show. Spam, eggs and hams are therefore used in python as a placeholder variable to remeber them as their references. When you are not able to define variable's name, then these are often used as placeholder variables whereas foo and bar are used in other languages (Including Python also). But, they are not advisable for big projects. Also, spam and eggs can be found on search bar. Try it.
28th Jul 2020, 11:25 AM
Arctic Fox
Arctic Fox - avatar
28th Jul 2020, 12:07 PM
Arctic Fox
Arctic Fox - avatar
+ 8
Ok, then, this may help you: Just go through it. https://www.sololearn.com/Discuss/602001/?ref=app
28th Jul 2020, 12:12 PM
Arctic Fox
Arctic Fox - avatar
30th Jul 2020, 9:30 PM
Namit Jain
Namit Jain - avatar
+ 1
A tips for you,Abhishek Kumar.If you don't undrstand anything about in python course,you can see the comments down below the lesson.The comments are very useful .Yet, if you don't understand you can post your problem in the comment.
28th Jul 2020, 11:34 AM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
class Spam(Egg):
27th Mar 2023, 11:15 PM
المهندس أحمد
المهندس أحمد - avatar
0
𝙍𝙞𝙨𝙝𝙖𝙗𝙝«ℙ𝕪3» I'm very new in programming it was all good and is all good except that line. It wasn't intended to give that line and break all flow in very beginning. I even don't know what placeholder variable is 😔 . What i got from your answer is that Monty python was a show and that's okay but what is its relationship with eggs, spam and ham? Please elaborate in simple words thank you for your effort.
28th Jul 2020, 12:02 PM
Abhishek Kumar
Abhishek Kumar - avatar
0
𝙍𝙞𝙨𝙝𝙖𝙗𝙝«ℙ𝕪3» i know about variable and i know how to name a variable which has been told at the url you just send but i don't know placeholder variable. And what these spam, eggs are...and why only these and not others.
28th Jul 2020, 12:10 PM
Abhishek Kumar
Abhishek Kumar - avatar