Another commit

This commit is contained in:
Bernardo Sulzbach 2014-07-07 19:56:54 -03:00
parent ac7a68da17
commit a071c64242

View File

@ -1,4 +1,31 @@
#!/usr/bin/python3 #!/usr/bin/python3
<<<<<<< HEAD
=======
# mari von steinkirch @2013
# steinkirch at gmail
def reverse_str(s):
''' in place '''
sr_ls = []
for i in range(len(s)-1, -1, -1):
sr_ls.append(s[i])
return ''.join(sr_ls)
def main():
s1 = 'abcdefg'
s2 = 'buffy'
s3 = ''
print(reverse_str(s1))
print(reverse_str(s2))
print(reverse_str(s3))
if __name__ == '__main__':
main()
>>>>>>> parent of 7b79f58... Faster, better, stronger
# Mari von Steinkirch @ 2013 # Mari von Steinkirch @ 2013
# mari.wahl9@gmail.com # mari.wahl9@gmail.com