Python Forum
Help Formatting Print Statement (input from 3 lists) X 2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Formatting Print Statement (input from 3 lists) X 2
#11
Did you try what I suggested? Did you create a list from 'now', 'cust_name', 'street', 'city', 'state'. Did you put this list in place of 'iterable' to see what will happen?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#12
In a simple print statement using f strings or the .format() method, you can specify how much padding should be applied to each variable.

For example,
Output:
>>> price = 345.67 >>> print(f'£{price:*>10.2f}') £****345.67
See the latter part of this article on Digital Ocean for more information.
I am trying to help you, really, even if it doesn't always seem that way
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Post IF Statement Input OrphanedSoul 2 2,275 Jun-04-2021, 05:03 PM
Last Post: deanhystad
  Problem with print formatting using definitions Tberr86 2 1,948 Mar-20-2021, 06:23 PM
Last Post: DPaul
Bug How to print only vowels from an input? PP9044 8 7,427 Feb-26-2021, 04:02 PM
Last Post: Serafim
  Print user input into triangle djtjhokie 1 2,343 Nov-07-2020, 07:01 PM
Last Post: buran
  How to print the docstring(documentation string) of the input function ? Kishore_Bill 1 3,500 Feb-27-2020, 09:22 AM
Last Post: buran
  Print the longest str from user input edwdas 5 4,051 Nov-04-2019, 02:02 PM
Last Post: perfringo
  How to print a statement if a user's calculated number is between two floats Bruizeh 2 2,350 Feb-10-2019, 12:21 PM
Last Post: DeaD_EyE
  if/else statement only outputs else statement regardless of input KameronG 2 2,560 Feb-08-2019, 08:04 AM
Last Post: KameronG
  How to force print statement to print on one line wlsa 4 3,503 Oct-28-2018, 09:39 PM
Last Post: wavic
  Print The Length Of The Longest Run in a User Input List Ashman111 3 3,141 Oct-26-2018, 06:56 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

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