0
이 그대로 작동하지만 .format는여러 줄 .format() 메소드는 3
내 질문에 좀 더 효율적으로 .format 방법을 사용할 수 있습니다 어떻게 요약 할 수있다. 나는 .format (switch)와 .format ([switch])를 시도했으나 오류가 발생했다. 아래 다시
구문을 모든 변수를 작성하는 피하기 위해 올바른 구문을 것입니다 무슨
..
switch = [SW_1, Int_1, Vlan_num, Des] #group of input variables
config1 = """
interface GigabitEthernet {1}
description {3}
switchport
switchport access vlan {2}
""".format(SW_1, Int_1, Vlan_num, Des)
print(config1)