White spaces - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: White spaces (/thread-21653.html) |
White spaces - kdiba - Oct-08-2019 Hello, I need your help for this : input : n=2005; while (n!=2008) : print("prediction_",n,",","parameters_",n,"=get_predictions_each_year",(n,12)); n=n+1;output: The output above is correct but I'm trying to remove some white spaces.I would like an output like : Thank you in advance for your help
RE: White spaces - Aurthor_King_of_the_Brittons - Oct-08-2019 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; |