小编MT3*_*T32的帖子

MySQL 8.0.11错误连接到caching_sha2_password无法找到指定的模块

我试图从MySQL工作台连接到最新的MySQL服务器8.0.11,但错误不断弹出:无法连接到MySQL服务器,身份验证插件:caching_sha2_password:无法找到指定的模块.

我尝试在线查看MySQL服务器安装视频并准确复制每一步,但错误仍然存​​在.

任何帮助是极大的赞赏.

mysql plugins mysql-workbench

14
推荐指数
2
解决办法
3万
查看次数

在python中使用for循环打印几个字符串

我试图在Python 3.7中的print语句中申请循环.

例如

string1="Liverpool is always alone"
string2="Manchester United is the best team in the world"
string3="Tottenham Hotspur is for losers"
string4="Leicester City is overrated"

for i in range(1,5):
    print(string%i.find(" is"))  # <---this is the problem
Run Code Online (Sandbox Code Playgroud)

我的最终目标是获得

9
17
17
14
Run Code Online (Sandbox Code Playgroud)

当然,我可以将结果存储在列表中,然后打印结果如下:

 results=[string1.find(" is"),
          string2.find(" is"),
          string3.find(" is"),
          string4.find(" is")]

    for i in range(1,4):
        print(results[i])
Run Code Online (Sandbox Code Playgroud)

但是当字符串的数量变得太多时,它会很麻烦.

请建议使用for循环打印多个字符串的方法.

我正在使用Python 3.7.

python for-loop python-3.x

1
推荐指数
1
解决办法
89
查看次数

标签 统计

for-loop ×1

mysql ×1

mysql-workbench ×1

plugins ×1

python ×1

python-3.x ×1