Allmäna tester
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Python is a dynamically typed language. Python uses values not variables :)
|
||||
# Python is a dynamically typed language. Python uses values not variables :)
|
||||
a = 100
|
||||
b = "foo"
|
||||
c = True
|
||||
@@ -13,9 +13,9 @@ print(c)
|
||||
print(d)
|
||||
print(a+d)
|
||||
|
||||
#bunch of different ways to concatenate different datatypes, format is recommended I believe
|
||||
# Bunch of different ways to concatenate different datatypes, format is recommended I believe
|
||||
print(str(a)+e)
|
||||
print(a,e)
|
||||
print("Concatenate: {} {}".format(a,e))
|
||||
print("Concatenate: {} {}".format(a,c))
|
||||
print("Concatenate: %d %s " % (a,e))
|
||||
print("Concatenate: %d %s " % (a,e))
|
||||
|
||||
@@ -33,4 +33,4 @@ print(tuple1)
|
||||
#There are even dictionaries with key/value pairing
|
||||
movies = {'Pacific Rim': '5 stars', 'Black Panther': '5 stars', "Zombie Beavers":"0 stars"}
|
||||
for i, j in movies.items():
|
||||
print(i,j)
|
||||
print(i,j)
|
||||
|
||||
Reference in New Issue
Block a user