0
What is a placeholder?
3 Answers
+ 2
1. For general way
A placeholder is a temporary thing/holder that can be replaced with something else later on.
Like the keyword: pass
2. For a string:
A placeholder is a place in a string that holds a variable inside it, like ->
CODE:
firstname = "Fahim"
lastname = "Safwan"
print("My name is {} {}".format(firstname, lastname))
# Here {} are placeholders
OUTPUT:
My name is Fahim Safwan
+ 2
Pass is a keyword in python that can be used as entire of a block of code body (placeholder) like classes and function:
class MyClass:
pass