Warning: Undefined array key 1 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 12
Warning: Undefined array key 2 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 15
Warning: Undefined array key 3 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 18
Warning: Undefined array key 4 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 21
Warning: Undefined array key 1 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 24
Warning: Undefined array key 2 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 27
Warning: Undefined array key 3 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 30
Warning: Undefined array key 4 in /home/semtable/teihenai.com/public_html/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 33
同じソースコードを10回くらい連続で実行したいことがありました。
そのソースコード内に追加で書き込んでもいいのですが、機械学習で遊んでいると追加書き込みでは対応できません。
なので、もうひとつソースコードを用意して、複数回実行したいと思います。
ソースコード
import os for a in range(回数): os.system('python プログラム') print(str(a)+'回目')
最後のprintは無くても問題ないですが、実行に時間がかかる場合は、どのくらい終わったのか分かるので便利です。
簡単なソースコードですが、すごく便利になりました!