################### # Homework 1.4 # Adam Brandeis # 02/09/2014 ################### #!/usr/bin/python int_var = 22 # This an interger float_var = 8.23 # This is a floating interger str_var = "Hello, Adam!" # This is a string variable flag_var = True # This is a boolean grocery_list = ['milk', 'cheese', 'bacon', 'eggs', 'muffins'] # this is a grocery list grocery_tuple = ('cereal', 'cookies', 'crackers', 'chicken') # this is a grocery list tuple dictionary = {'milk': 'cereal liquid', 'eggs': 'chickens make', 'cookies': 'dessert food'} # this is a dictionaryy a_set = set([1, 2, 33, 55.99, 101]) # this is a set print int_var print float_var print str_var print flag_var print grocery_list print grocery_tuple print dictionary print a_set
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question