This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WScript.Echo("Hello, world!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "Module1" | |
Sub ファイル出力() | |
Attribute ファイル出力.VB_Description = "定義書用のマクロを出力する" | |
Attribute ファイル出力.VB_ProcData.VB_Invoke_Func = "O\n14" | |
' | |
' ファイル出力 Macro | |
' 定義書用のマクロを出力する | |
' | |
' Keyboard Shortcut: Ctrl+Shift+O | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
args = sys.argv | |
print(args) #引数をすべて表示 | |
for i in range(len(args)): | |
list_item = args[i] | |
print('{0}:{1}'.format(i, list_item)) #ループして1件1件表示 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
args = sys.argv | |
param = args[1] | |
if param.isdecimal(): | |
print("数字です") | |
print("処理終了") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
args = sys.argv | |
param = args[1] | |
if param.isdecimal(): | |
print("数字です") | |
else: | |
print("数字ではありません") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
args = sys.argv | |
param = args[1] | |
if param.isdecimal(): | |
val = int(param) | |
if val <= 5: | |
print("5以下です") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import csv | |
with open('read_data.csv', 'r') as f: | |
reader = csv.reader(f) | |
header = next(reader) | |
print("ヘッダー行:") | |
print(header) | |
data = next(reader) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
list = [1, 2, 3, 4] | |
print(list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
list = [1, 2, 3, 4] | |
print("0番目:" + str(list[0])) | |
print("1番目:" + str(list[1])) | |
print("2番目:" + str(list[2])) | |
print("3番目:" + str(list[3])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
list = [1, 2, 3, 4] | |
print("追加前:" + str(list)) | |
list.append(5) | |
print("追加後:" + str(list)) |
OlderNewer