0

What is a placeholder?

10th Nov 2019, 4:49 PM
Fahim Safwan
Fahim Safwan - avatar
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
10th Nov 2019, 4:58 PM
OR!ON đŸ›Ąïž
OR!ON đŸ›Ąïž - avatar
+ 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
10th Nov 2019, 4:56 PM
Qasem