本文介绍了Python中有什么函数而不是VB6中的Val()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在将一些程序从Visual Basic 6.0转换为Python,而我在VB中被困在一行中。 Visual Basic代码:I'm converting some programs from Visual Basic 6.0 to Python, and I'm stuck in one line in VB. Visual Basic code:bAddStart = "100"bNoOfBytes = "94"MeterId = 1Data = Chr(MeterId) + Chr(3) + Chr(Val(bAddStart) \ 256) + Chr(Val(bAddStart) Mod 256) + Chr(0) + Chr(Val(bNoOfBytes)) 对于VB中的函数Chr(),我在Python中使用chr()。对于Val函数,哪个函数在Python中类似?For the function Chr() in VB I'm using chr() in Python. For the Val function, which function is similar in Python?推荐答案 这篇关于Python中有什么函数而不是VB6中的Val()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-22 12:55