Skip to content
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

exercises-latex-4\13-python #452

Open
ESaarmann opened this issue Oct 4, 2024 · 4 comments
Open

exercises-latex-4\13-python #452

ESaarmann opened this issue Oct 4, 2024 · 4 comments

Comments

@ESaarmann
Copy link

Beim erstellen der Tabelle in loesung.py in line 87 wirft zip einen der Werte aus data.txt weg. Da data 51 Zeilen enthält und t1 daher um ein Elemnt länger ist als t2.

@ESaarmann
Copy link
Author

Außerdem in line 88 .format() schreibweise durch fstring ersetzen.

@aknierim
Copy link
Member

aknierim commented Oct 4, 2024

Line 88 ist richtig so, da der String in table_format mit der format Methode nachträglich verändert wird.

Man könnte zwar auch einen f-String verwenden, allerdings müsste der dann auch direkt in-place gesetzt werden, was es nicht möglich macht, diesen als template für z.B. weitere Tabellen zu nutzen.

@chrbeckm
Copy link
Member

chrbeckm commented Oct 4, 2024

Wäre aber konsistent mit dem, was im python-notebook gezeigt wird. Darum ging es mir.

@aknierim
Copy link
Member

aknierim commented Oct 4, 2024

Fair enough, ich denke das hier ist dennoch ein gutes Beispiel um auch mal die format Methode zu verwenden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants