4 search resultsShowing 1~4 results

Stocked
Ma_AtoP

@Ma_AtoP

Python 標準入力まとめ

基本的な入力 (1区切りの文字列の入力) 区切りのない連続した文字列の入力。 入力した文字列の型を任意に指定でき、指定しない場合はstr型になる。 以下で二通りの標準入力の仕方を紹介する。 in...

10
18
Comment0
Ma_AtoP

@Ma_AtoP

Python 組み合わせ(combination)

はじめに 異なるn個のものの中からr個を選ぶ場合の数を組み合わせと呼ぶことにし、以下のようにあらわす。 {}_n C _r = \frac{n!}{r!(n-r)!} pythonで${}_n ...

12
11
Comment1
Ma_AtoP

@Ma_AtoP

Python リストの操作

多次元リストのソート 多次元リストをソートする際、評価基準を指定することができるようです。 また、その評価基準は複数指定できるようです。 その際、sort(key=lambda x:(x[0],...

0
1
Comment0
Ma_AtoP

@Ma_AtoP

Python 文字列の操作

特定の文字をカウント 文字列中の特定の1文字を探す場合。 count1.py tokyo = 'toukyoutokkyokyokakakyokukyokakyokutyou' print(to...

0
0
Comment0

4 search resultsShowing 1~4 results

Qiita is a knowledge sharing service for engineers.

  1. You can follow users and tags
  2. You can stock useful information
  3. You can make edit suggestions for articles
Functions that can be used after logging in