Functions

  • append()

  • len() - returns the length of a list

  • range()

  • int()

  • input()

  • sorted() - returns the sorted version of a list

def reverse_string(str):
    st1 = s[::-1]
    print(st1)
    
reverse_string("Hello")
def reverse_string(str):
    st1 = ''.join(reversed(s))
    print(st1)
    
reverse_string("Hello")

Higher-Order Functions

Functions Applied to Functions

Functions that operate on other functions are called Higher-Order functions

Last updated

Was this helpful?