python - python中set()中的花括号和方括号
问题描述
我不明白为什么 current.value 在这里被方括号包围:
current = linkedlist.head
seen = set([current.value])
我的第一反应是写 ''' seen = set(current.value) '''
而且我不明白为什么这不起作用。
谢谢
解决方案
推荐阅读
- angular - 在 Asp.net core 2 Visual Studio 2017 上使用 --environments 和 Angular SPA
- hadoop - logstash 非法状态异常?
- javascript - 使用javascript将逗号分隔的数组减少为字符串
- xml - 如何使用 powershell 将数据插入 XML 子元素
- nativescript - 相机拍摄功能不适用于 ios
- java - 触摸播放音频 - Android
- laravel-5 - 不带域名的 Apache 配置文件名
- 32-bit - Rakudo x86 32 位预编译安装程序/二进制文件在哪里?
- biztalk - BizTalk Direct-Bound 发送端口慢触发
- android - 显示 android tablayout viewpager 的不正确片段