73953/syntaxerror-invalid-syntax-print-worldlists-len-words
Hi Guys,
I am trying to print the output of my python code. But it is showing me the below error.
File "<ipython-input-3-8f2363e8378d>", line 10 print worldlists[len(words)] ^ SyntaxError: invalid syntax
Can anyone help me with this?
Hi@akhtar,
This syntax will not allow in all the platforms. If you are trying to print any string you need to use double-quotes. But here you are trying to print some variable value. So you need to use parenthesis as given below.
print (worldlists[len(words)])
I hope this will help you.
but i m getting this ouput: Enter the ...READ MORE
If you're using Jupyter notebook, just mention this ...READ MORE
def Psat(self, T): pop= ...READ MORE
A "SyntaxError: invalid syntax" is a common ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
Hi@akhtar, You need to write your if-else code ...READ MORE
Thanks, This answer was helpful. READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.