This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you can create a list like this | |
fruits = [ | |
'apple', | |
'grapes', | |
'banana' | |
] | |
favourite_fruit = "mango" | |
if favourite_fruit in fruits: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
def multiply(a, b, c): | |
return a * b * c + 1 | |
class MathTest(unittest.TestCase): | |
def testMultiply(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_name(first_name, last_name): | |
print(first_name + " " + last_name) | |
friends = [ | |
{ | |
'first_name': 'Sherlock', | |
'last_name': 'Holmes' | |
}, | |
{ |