my python is confusing the minus with dash sign

前端 未结 2 2069
忘了有多久
忘了有多久 2020-12-20 10:28

I am trying to run the following python with \" python get_timestamp.py -f gsham_input.xvg -1 −0.1348 -2 −0.1109\". However, it seems that the python is mistaking

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-20 10:42

    In Python 3

    float_num_of_str = float(arg_str.replace(u"\u2212", "-"))
    

提交回复
热议问题