Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5493

Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel

From Hartmut Goebel <h.goebel@goebel-consult.de>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel
Date 2019-06-19 14:08 +0200
Organization Goebel Consult
Message-ID <mailman.151.1560946683.21674.python-de@python.org> (permalink)
References <1825444.o0KX4FVeTt@host> <A873B342-4C42-4F2A-924F-1B8DA32A6488@wodca.de> <2735687.t9uVyT51e0@host> <9390763f-1e2a-fb62-50ed-6b776764aec9@goebel-consult.de>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Am 18.06.19 um 22:53 schrieb eilfh:
> for i in range(1, spalten_anzahl + 1):

Nur eine kleine Anmerkung:

Nachdem Du unten dann immer "i-1" verwendest, kannst Du hier
"range(spalten_anzahl)" verwenden. Das läuft von 0 und bis
spalten_anzahl-1, liefert also alle Indexe für die Element in der Liste.

Analog für j.

Der Code wird damit einfacher und klarer zu lesen: "Ah, das ist eine
Schleife über alle Element der Matrix".

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog:
https://www.goe-con.de/blog/bin-offiziell-entdecker-einer-sicherheitslucke
Kolumne:
https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2010-01-hinterturen-allen-ortes-1
<https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2010-01-hinterturen-allen-ortes>


Back to de.comp.lang.python | Previous | Next | Find similar


Thread

Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel Hartmut Goebel <h.goebel@goebel-consult.de> - 2019-06-19 14:08 +0200

csiph-web