Teil 6 "Objekte ist neu
Repository aufgeräumt.
This commit is contained in:
12
teil4/find_eigen.py
Normal file
12
teil4/find_eigen.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
def find_in_string(s, c):
|
||||
|
||||
for pos in range(0,len(s)):
|
||||
if(s[pos] == c):
|
||||
return pos
|
||||
return -1
|
||||
|
||||
|
||||
print(find_in_string('Homer','e'))
|
||||
print(find_in_string('Homer','n'))
|
||||
|
Reference in New Issue
Block a user