0
what is place holder variable??
1 Réponse
+ 2
It is when you create a variable with a value that you expect to change later.
Example:
lst = [3,8,2,6,1,4]
result = lst[0] # placeholder
for num in lst:
if num > result:
result = num # re-assignment
print(result) # result will show the largest number in the list