TB1 Week 10
Programming for Animation Devblog » Devlog
The return keyword in a function allows the function to return and variables assigned to the keyword, this is used when you want to call the function using a variable.
E.g.
def printName(name):
print(name)
def Name():
return “John”
printName(Name())
#a will go into Name() then find out it returns John and assign John to a
a = Name()
print(a)
#This will print John as a now equals John
printName(a)
Programming for Animation Devblog
Status | Prototype |
Category | Other |
Author | Pomanchocho |
More posts
- TB1 Week 9Dec 05, 2022
- TB1 Week 8Dec 05, 2022
- TB1 Week 7Dec 05, 2022
- TB1 Week 6Dec 05, 2022
- TB1 Week 5Dec 05, 2022
- TB1 Week 4Dec 05, 2022
- TB1 Week 3Dec 05, 2022
- TB1 Week 2Dec 05, 2022
Leave a comment
Log in with itch.io to leave a comment.