In python I want a lambda which return space characters equal to the input. for example.
x=lambda x: return space x times
print "my message",x(10),"my message 2"
Output:
my message<10 space>my message 2
This will cater my need in a particular situation. I can write a function for this but if this could be done?
Something like:
x = lambda times:' '*times
print "my message{0}my message 2".format(x(10))
my message my message 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With