题目
题目
单项选择题

Question at position 12 In Flask, how do you correctly pass a variable named username with the value "Alex" to a template named profile.html for rendering?In Flask, how do you correctly pass a variable named username with the value "Alex" to a template named profile.html for rendering?return render_template('profile.html', username='Alex')return render_template(username='Alex', 'profile.html')return 'profile.html', {'username': 'Alex'}return render_template('profile.html', {'username': 'Alex'})

选项
A.return render_template('profile.html', username='Alex')
B.return render_template(username='Alex', 'profile.html')
C.return 'profile.html', {'username': 'Alex'}
D.return render_template('profile.html', {'username': 'Alex'})
查看解析

查看解析

标准答案
Please login to view
思路分析
Question: In Flask, how do you correctly pass a variable named username with the value "Alex" to a template named profile.html for rendering?\n\nAnswer options: \n- return render_template('profile.html', username='Alex')\n- return render_template(username='Alex', 'profile.html')\n- return 'profile.html', {'username': 'Alex'}\n- return render_template('profile.html', {'username': 'Alex'})\n\nOption 1: return render_template('profile.html', username='Al......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!