0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Pythonの便利技と注意点:条件編

Last updated at Posted at 2022-08-29

目次に戻る

範囲条件を簡単に

数字 < 変数 < 数字
>>> num = int(input())
5
>>> if 1 < num < 10:
	print(num)

5
数字 <= 変数 <= 数字
>>> num = int(input())
3
>>> if 1 <= num <= 5:
	print(num)
	
3

目次に戻る

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?