How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example:
a = 'string' # this holds 6 characters
print '*' * # amount of characters in string
How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example:
a = 'string' # this holds 6 characters
print '*' * # amount of characters in string
Jump to PostPerhaps you mean
>>> len('string') 6
Perhaps you mean
>>> len('string')
6
Thanks I have not been doing much work with strings latley I feel stupid now. Thanks for helping me though
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.