I'm trying to create a program that involves assigning a string to the variable x depending on the length of the string assigned to variable y. The amount of commas in x should be the same as the length of y.
For example if e='h'
, x=','
. If e='hi'
, x=',,'
. If e='him'
, x=',,,'
By the way, I'm new to programming so I don't know this stuff.