質問するログイン新規登録

回答編集履歴

3

修正

2020/05/11 11:21

投稿

ForestSeo
ForestSeo

スコア2724

answer CHANGED
@@ -1,3 +1,4 @@
1
1
  ```Python
2
- if line[0:7] is not "http://" or line[0:8] is not "https://":
2
+ if line[0:7] != "http://" or line[0:8] != "https://":
3
- ```って正常な値も通りますよね
3
+ ```って正常な値も通りますよね
4
+ 絶対どちらかはTrueになります。

2

修正

2020/05/11 11:21

投稿

ForestSeo
ForestSeo

スコア2724

answer CHANGED
@@ -1,3 +1,3 @@
1
1
  ```Python
2
2
  if line[0:7] is not "http://" or line[0:8] is not "https://":
3
- ```って正常な値も通りませんか?
3
+ ```って正常な値も通りますよね

1

修正

2020/05/11 11:20

投稿

ForestSeo
ForestSeo

スコア2724

answer CHANGED
@@ -1,6 +1,3 @@
1
1
  ```Python
2
- is not
3
-
4
- !=
5
- ```isというのは、オブジェクトを生成するとき他のオブジェクトとは重複する事のない一意の番号(id)が等しいかです。
6
- [こちら](https://www.python-izm.com/tips/difference_eq_is/)を参考に
2
+ if line[0:7] is not "http://" or line[0:8] is not "https://":
3
+ ```って正常な値も通りませんか?