when dictionary has one value for each key it's okey. I'm just type '% greek_letters' and it's working.
But how can i assign dict's values to formatted print, if it has more values than one. > > 1. # -*- coding: utf-8 -*- > 2. greek_letters = { > 3. 'omega': ['ω','Ω'], 'psi': ['ψ', 'Ψ'] , 'kapa': > 'κ', 'to': ['τ', 'Τ'], 'lambda': ['λ', 'Λ'], > 4. 'ksi': ['ξ', 'Ξ'], 'delta': ['δ', 'Δ'], 'mu': > ['μ'], 'sigma': ['σ', 'Σ'], 'epsilon': ['ε', 'Ε'], > 5. 'gamma': ['γ', 'Γ'], 'phi': ['φ', 'Φ'], > 'theta': ['θ', 'Θ'] > 6. } > 7. print 'x(%(to)s) = A * cos(%(omega)s * %(to)s + %(theta)s)' % > greek_letters.values()[1] > >
-- https://mail.python.org/mailman/listinfo/python-list