Why isn't isnumeric working?

前端 未结 4 1897
孤城傲影
孤城傲影 2020-12-17 09:25

I was going through a very simple python3 guide to using string operations and then I ran into this weird error:

In [4]: # create string
        string = \'L         


        
4条回答
  •  无人及你
    2020-12-17 10:02

    if using python 3 wrap string around str as shown below

    str('hello').isnumeric()

    This way it behaving as expected

提交回复
热议问题