removing the ' ' and the spaces in the return output python3
i am trying out a function where you have to use def function(a,b,c,d) a
is a string so i did
a = str(a)
b is an integer so i did
b= int(b)
c is also a string;
c = str(c)
and d is a boolean (all i know about boolean is True or False); so
d = True
i wanted to change the order of the elements into
[c,a,b,d]
and i assigned this to result = [c,a,b,d] when i used the return function
return str(result), (because i want to return a string)
i ended up with
"[ 'c', 'a', b, d]"
i have tried everything to get rid of the ' ' and also the spacing because
it should really look like
'[c,a,b,d]'
what can i do to remove it?
No comments:
Post a Comment