top of page

Python Review


Thank you for the inspiration :)

Let's review...

  • Data types

  • Numbers

  • Strings

  • Printing - print('My number is: {}, and my name is: {}'.format(num,name))

  • Lists

  • Dictionaries - d = {'key1':'item1','key2':'item2'}

  • Booleans

  • Tuples - t = (1,2,3)

  • Sets - {1,2,3,1,2,1,2,3,3,3,3,2,2,2,1,1,2}

  • Comparison Operators

  • if, elif, else Statements

  • for Loops - for item in seq: print(item)

  • while Loops - i = 1while i < 5: print('i is: {}'.format(i)) i = i+1

  • range() - list(range(5))

  • list comprehension - [1,2,3]

  • functions def my_func(param1='default'): """ Docstring goes here. """ print(param1)

  • lambda expressions - lambda var: var*2

  • map and filter - filter(lambda item: item%2 == 0,seq)

  • methods - tweet.split('#')

====


Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page