Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ def fizz_buzz(self, digit_1, digit_2):
else:
print i

def print_method(self):
print self.foo
print self.bar
print self.baz
print "Done"
print "Bye"

def json_to_csv(self, json_file_path, outfile_path):
"""Convert a file containing a list of flat JSON objects to a csv.

Expand All @@ -34,3 +41,19 @@ def json_to_csv(self, json_file_path, outfile_path):
writer.writerow(data[0].keys())
for item in data:
writer.writerow(item.values())

def another_method(self, digit_1, digit_2):
for i in range(1, 100):
if i % digit_1 == 0:
if i % digit_2 == 0:
print 'Hello There!'
else:
print 'fizz!'
elif i % digit_2 == 0:
print 'Hi!'
else:
print i

if __name__ == '__main__':
t = TestClass(1, 2, 3)
TestClass.fizz_buzz(3, 5)