我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

关于#python#的问题,请各位专家解答!

img

Write a program that will try to append to the
tuple that you created in Q1.Why will this
code produce an error? Modify your code
using try and except statements to handle this
error,reporting to the user that an attempt
was made to append avalue to the tuple

[](


```python
list = ("hello", 10, "goodbye", 3, "goodnight", 5)
s = 0
for i in list:
    if type(i)==str:
        s=s+1
print(s)


```python


```

近期文章

  • 这个代码怎么写,小白一个,不会写。
  • MATLAB中如何将多个方程合并成一个方程?
  • 求解Proteus8.11使用过程中遇到的问题
  • 损坏的映像怎么解决?
  • 喇叭的大小组合和什么有关
  • 自己写了个代码不知道对不对 求个答案 害怕自己的大错特错所以不敢发h
  • Python题目,求解答
  • 数据预处理与数据清洗
  • c语言 switch语句做
  • 在eclipse中,结束应用程序Terminate的快捷键是什么?
  • eclipse-inst-jre-win64无法打开
  • 为什么会这样,哪里出问题了吗
  • localhost服务器响应超时,已关闭网络防火墙
  • 为什么66行的结果和70行的结果不同?
  • 运行正确,但显示scanf的返回值被忽略
  • Java编程技术题目111
  • 这个题用C#怎么做呀?
  • 进去安全引导模式后屏幕太亮,亮度声音都无法调节
  • 用神经网络训练模型,报错字符串不能转换为浮点,请问怎么解决?
  • c#如何写怎么写有人会吗

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华