Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
White spaces
#2
Use "sep" as follows to eliminate all spaces and then add spaces where you want them inside the quotes.

    n=2005;
    while (n!=2008) :
        print("prediction_",n,", ","parameters_",n, " =get_predictions_each_year",(n,12), sep='');
        n=n+1; 
Reply


Messages In This Thread
White spaces - by kdiba - Oct-08-2019, 06:26 PM
RE: White spaces - by Aurthor_King_of_the_Brittons - Oct-08-2019, 06:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  identify not white pixels in bmp flash77 17 2,724 Nov-10-2023, 09:21 PM
Last Post: flash77
  including the white space parts in str.split() Skaperen 6 3,361 Jun-20-2019, 06:03 PM
Last Post: Skaperen
  replace white space with a string, is this pythonic? Skaperen 1 2,048 Jun-18-2019, 11:36 PM
Last Post: metulburr
  Because the emoji appears black and white at the exit ? nerd 3 5,677 Jan-28-2019, 11:34 PM
Last Post: nerd
  White Space Help JayMan 9 6,400 Dec-26-2017, 02:58 AM
Last Post: Skaperen
  Python interface only black and white........ Wilson 3 6,245 Jul-15-2017, 01:20 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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