+ 2
What is spam, ham and egg in python and foo and bar in other programming language (solved)
I also searched in google but could'nt understand a single word. They were stating something like metasyntetic variable and placeholder as I barely understand this type of english😅. Can anyone please please explain in simple words?
7 Réponses
+ 8
They're(generally) Nothing but a placeholder or metasyntetic variables (Sorry for using that english again)
Understand it as just variables in any code used for giving examples or using it in a place where you don't have names for variables.
Spam,ham,egg are also used for same purposes not only in python but also in other programming languages.
A simple example can be:
spam=5
print(spam)
If I didn't help you understand better,refer to these threads:
https://www.sololearn.com/discuss/1726120/?ref=app
https://www.sololearn.com/discuss/2417655/?ref=app
https://www.sololearn.com/discuss/347889/?ref=app
https://www.sololearn.com/discuss/90151/?ref=app
https://www.sololearn.com/discuss/2060248/?ref=app
https://www.sololearn.com/discuss/742208/?ref=app
https://www.sololearn.com/discuss/1198172/?ref=app
https://www.sololearn.com/discuss/786021/?ref=app
https://www.sololearn.com/discuss/426377/?ref=app
+ 9
https://code.sololearn.com/W6M9RVIae5Le
+ 4
Sometimes used as variable names.
+ 4
Martin Taylor yes I've mostly heard a different variant of 'fouled'.
+ 2
You have to read monty python book for that they are just Foo and bar just name change
+ 1
<k>~~~~~~~~~~~~</k> Just like you used Googles search bar to find your answer , do that here too , Check this :
https://www.sololearn.com/Discuss/786021/?ref=app
https://www.sololearn.com/discuss/742208/?ref=app
https://www.sololearn.com/discuss/90151/?ref=app