Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Append inside for?
#5
(Jan-13-2024, 07:28 PM)noisefloor Wrote: using 4 spaces per level of indention is what is recommended to use. See also the PEP8 on this.

I read the PEP8, but it doesn't explain why 4 spaces are preferred to tab.
https://legacy.python.org/dev/peps/pep-0...-or-spaces

I find tabs easier to count. If there are 4 tabs, i've got 4 perfect indents. If there are 16 spaces, that's more to count, and harder to interpret visually. 15 spaces? 17 spaces? Still looks correct!
Reply


Messages In This Thread
Append inside for? - by johnywhy - Jan-13-2024, 06:46 PM
RE: Append inside for? - by deanhystad - Jan-13-2024, 07:06 PM
RE: Append inside for? - by johnywhy - Jan-13-2024, 07:14 PM
RE: Append inside for? - by noisefloor - Jan-13-2024, 07:28 PM
RE: Append inside for? - by johnywhy - Jan-13-2024, 09:32 PM
RE: Append inside for? - by deanhystad - Jan-14-2024, 01:19 AM
RE: Append inside for? - by johnywhy - Jan-14-2024, 04:50 AM
RE: Append inside for? - by deanhystad - Jan-14-2024, 01:11 PM
RE: Append inside for? - by johnywhy - Jan-15-2024, 12:13 AM
RE: Append inside for? - by Gribouillis - Jan-15-2024, 08:33 AM
RE: Append inside for? - by johnywhy - Jan-15-2024, 11:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cant Append a word in a line to a list err "str obj has no attribute append Sutsro 2 2,703 Apr-22-2020, 01:01 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020