What is spam, ham and egg in python and foo and bar in other programming language (solved) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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?

2nd Jan 2021, 7:23 AM
<k>Kartik</k>
6 Answers
+ 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
2nd Jan 2021, 7:35 AM
Arctic Fox
Arctic Fox - avatar
+ 9
https://code.sololearn.com/W6M9RVIae5Le
2nd Jan 2021, 9:29 AM
David Ashton
David Ashton - avatar
+ 4
Sometimes used as variable names.
2nd Jan 2021, 7:54 AM
Sonic
Sonic - avatar
+ 4
Martin Taylor yes I've mostly heard a different variant of 'fouled'.
2nd Jan 2021, 7:59 PM
Sonic
Sonic - avatar
+ 2
You have to read monty python book for that they are just Foo and bar just name change
3rd Jan 2021, 5:05 PM
Sayyam Jain
Sayyam Jain - avatar
2nd Jan 2021, 7:32 AM
Alphin K Sajan
Alphin K Sajan - avatar