I'm new to python seeking your help. I would like to create a string combination of postive, Negative, floats, Upper case, Lower case elements
Example: Like random combination.
As-1jP0.7M -->output
Explanation
A - caps A
s- small S
-1 - Negative 1
j- small j
0.7 - float 0.7
M- caps M
My ranges
Caps - A - Z
small- a -z
positive - 0 to 9
Negatives - -1 to -9
float - 0.1 to 0.9
I know I'm asking too much but by doing some basic researcg I got idea how to generate combination of Alphanumeric
numbers like.
import random, string
x = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in range(10))
print(x)
This ok...But, I'm completely clueless how to add Negative
& float
types along with alphanumerics
..Any suggestions how to achieve it. Like we have any some shorcuts like string.floatdigits
? or string.negatives
? I've searched for similar syntax but, But I 'havent found anything