Skip to content

rm not needed parantheses and default values #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Level_06/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pass

print("unbekannte Länge:")
for x in tqdm((x for x in range(25000000))):
for x in tqdm(x for x in range(25000000)):
pass

print("grafisch:")
Expand Down
3 changes: 1 addition & 2 deletions Level_08/generatoren.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Generatoren und yield
def gen(s):
for char in s:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, das macht vielleicht mehr Sinn zu behalten?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ich habe das wieder reverted. ich denke, den generatoren teil kann man noch etwas ausbauen, ich werde da noch ein ticket zu aufmachen.

yield char
yield from s

# iterieren mit einer for-Schleife:
for x in gen("abcdef"):
Expand Down
2 changes: 1 addition & 1 deletion Level_08/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def even(n):
# lambda
print(list(filter(lambda x: x % 2 == 0, r)))

print(all((even(x) for x in even_numbers)))
print(all(even(x) for x in even_numbers))

# für mehr Spaß mit Generatoren: https://docs.python.org/3/library/itertools.html
2 changes: 1 addition & 1 deletion Level_08/with.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Dateien öffnen

with open("../Level_04/loremipsum.txt", "r") as lorem:
with open("../Level_04/loremipsum.txt") as lorem:
print(lorem.read())

# Exceptions ignorieren
Expand Down
1 change: 0 additions & 1 deletion Level_10/label.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# coding: utf-8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


# Level 9: Ein Label in einem Fenster.

Expand Down