2021年3月4日星期四

How to set default value for multiple inputs from one line in python

I'm trying to get specifications three necessary inputs and a fourth optional one from one input in python.

a , b , c , d = input("Please enter the number of the figure you would like and the x y coordinated in that order and a colour if you choose.").split()  

I want d to be optional with a set default value but I'm really struggling with it, Any help would be greatly appreciated!

https://stackoverflow.com/questions/66485707/how-to-set-default-value-for-multiple-inputs-from-one-line-in-python March 05, 2021 at 10:02AM

没有评论:

发表评论