Using = operator, you can assign values to multiple variables in one line.
multiple_assignment.py
id, name, age = 1, "Krishna", 31
print(f"id : {id}, name : {name}, age : {age}")
Output
$python3 multiple_assignment.py
id : 1, name : Krishna, age : 31
No comments:
Post a Comment