top of page

ENCOR Questions – Part 8-2 | Update 7 มี.ค.2023

Question 26 Refer to the exhibit. 1 def main(): 2 vlans = {'vlan10':'', 3 'vlan20':'', 4 'vlan30':'' } 5 vlans_key(vlans) 6 7 def vlans_key(vlans): 8 for key in vlans.keys(): 9 print(str(key) + ' '+ str(vlans[key])) 10 11 if __name__ == '__main__': 12 main() What is printed to the console when this script is run? A. a key-value pair in tuple type B. a key-value pair in list type C. a key-value pair in string type D. an error Answer: C Explanation The output of this Python is shown below: We can see the key and value are printed in string type.


เพื่อเข้าอ่านโพสต์เนื้อหาพิเศษนี้ต่อ โปรดสมัครใช้งาน

ดู 10 ครั้ง0 ความคิดเห็น


Obtuvo 0 de 5 estrellas.
No se pudieron cargar los comentarios
Parece que hubo un problema técnico. Intenta volver a conectarte o actualiza la página.
bottom of page