Computer Science, asked by kaushlendravij3980, 10 months ago

Write the output of the following code.
# !/usr/bin/python
str = "this2009" # No space in this string print str.isalnum( )
str = "this is string example….wow!!!"
print str.isalnum( )

Answers

Answered by codiepienagoya
0

The output of the given code as follows:

Output:

False

Explanation:

  • In the given code, two str variable is defined, in which first "str" variable it initializes a value, that is "this2009" and in the second "str" variable, it initializes another value that is "this is string example….wow!!!".
  • In the next line print method is used, in which the "isalnum()" method is used, that check the given value is alphanumeric or not, and returns its value, that is true or false.
  • In the given code, the second str variable is used to check its value that's why it will give False value.

Learn more:

isalnum method: https://brainly.in/question/16088433

Similar questions