Python Forum
A "Nested Loop" example from python 3.3.4 to 2.6!!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A "Nested Loop" example from python 3.3.4 to 2.6!!
#4
Try changing to:
print '{0:>4}'.format(' '),
In python older than 2.7/3.1 field names(0 in this case) are required when calling .format().
Reply


Messages In This Thread
RE: A "Nested Loop" example from python 3.3.4 to 2.6!! - by stranac - Dec-18-2016, 08:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Big O runtime nested for loop and append yarinsh 4 1,438 Dec-31-2022, 11:50 PM
Last Post: stevendaprano
  Nested for loops - help with iterating a variable outside of the main loop dm222 4 1,675 Aug-17-2022, 10:17 PM
Last Post: deanhystad
  How do I add another loop to my nested loop greenpine 11 4,663 Jan-12-2021, 04:41 PM
Last Post: greenpine
  Error on nested loop : Invalid syntax dvazquezgu 3 3,296 Nov-25-2020, 10:04 AM
Last Post: palladium
  Nested loop indexing Morte 4 4,018 Aug-04-2020, 07:24 AM
Last Post: Morte
  Nested for loop not looping puttingwordstogether 0 1,743 Jun-16-2020, 11:15 PM
Last Post: puttingwordstogether
  Help: for loop with dictionary and nested lists mart79 1 1,897 Apr-12-2020, 02:52 PM
Last Post: TomToad
  Nested Loop for user input Ads 2 3,585 Dec-30-2019, 11:44 AM
Last Post: Ads
  openpyxl nested for loop help rmrten 3 5,756 Oct-16-2019, 03:11 PM
Last Post: stullis
  nested for loop dilemma YoungGrassHopper 9 4,259 Sep-13-2019, 03:56 AM
Last Post: jsira2003

Forum Jump:

User Panel Messages

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