我正试图学习Lua上的绳索,并且正在浏览在线教程。我试图解决的一个问题是检查表local foo = {}以查看它有多少元素。教程给出了使用local length = table.getn(foo)的建议。当我尝试使用Lua52时,出现错误,提示attempt to call field 'getn' (a nil value)。我环顾四周,并进一步发现任何与table给出的函数产生相同类型的错
def encrypt(text, key, direction):
if direction == 1: #The direction is either -1, or 1. If it is 1, it goes right. Otherwise, it will go left.
emptys=''
for x in text:
b = ord