Skip to content

Commit

Permalink
Merge pull request #232 from SpotlightForBugs/deepsource-fix-592f3ed7
Browse files Browse the repository at this point in the history
Replace range(len(...)) with enumerate(...)
  • Loading branch information
SpotlightForBugs committed Jan 8, 2023
2 parents a68c10c + f8bc73d commit d310ed1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,15 @@ def warten(): # function for the wait function

string = line.lower().replace(",", "").replace(".", "").split(" ")
words.extend(iter(string))
for i in range(len(words)):
for i, item in enumerate(words):
count = 1
for j in range(i + 1, len(words)):
if words[i] == words[j]:
if item == words[j]:
count = count + 1

if count > maxCount:
maxCount = count
name_tot = words[i]
name_tot = item

with open("rollen_log.txt", "r+") as fileTot:

Expand Down Expand Up @@ -939,15 +939,15 @@ def wahl_stats():

string = line.lower().replace(",", "").replace(".", "").split(" ")
words.extend(iter(string))
for i in range(len(words)):
for i, item in enumerate(words):
anzahl = 1
for j in range(i + 1, len(words)):
if words[i] == words[j]:
if item == words[j]:
anzahl = anzahl + 1

if anzahl > maxCount:
maxCount = anzahl
name_tot = words[i]
name_tot = item

werwolf.schreibe_zuletzt_gestorben(name_tot)

Expand Down Expand Up @@ -1086,15 +1086,15 @@ def wer_wahl_warten():

string = line.lower().replace(",", "").replace(".", "").split(" ")
words.extend(iter(string))
for i in range(len(words)):
for i, item in enumerate(words):
count = 1
for j in range(i + 1, len(words)):
if words[i] == words[j]:
if item == words[j]:
count = count + 1

if count > maxCount:
maxCount = count
name_tot = words[i]
name_tot = item

with open("rollen_log.txt", "r+") as fileTot:

Expand Down

0 comments on commit d310ed1

Please sign in to comment.