Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80414
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <yusufcanbayrak@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; '-*-': 0.07; 'assign': 0.07; 'utf-8': 0.07; 'coding:': 0.09; "'lambda':": 0.16; 'formatted': 0.16; 'skip:{ 30': 0.16; 'subject:issue': 0.16; "skip:' 30": 0.19; 'working.': 0.19; 'print': 0.22; 'values': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; "skip:' 40": 0.31; 'but': 0.35; 'received:google.com': 0.35; 'to:addr :python-list': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'more': 0.64; '8bit%:97': 0.74 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=G03ftTjGIcxrZPGJQ2rdHRannI3KL8HkhgMGj0F5Lq8=; b=S+47aTqFbZjFxEsJEs5Qd9Gf8+KIk8MXVBnURsmXsM5bDrJ7OSC2QoU1MjUhGsXDkt REHezQbJ2gnIuAJjwIxBZmLSe2Re9AisM7ZbMIl9iQXYEb/W6x2EEgirh/MMVbHmTQvh dRnKeZuav3fZMIb6JNASKJ1oXRC+q1P59lQ72pIQ1wmMBeqX6t1bOEJo/L5+Oacz9h+J d+KriW7KQC67Z5PFHOfjH7dgGEqazvEOqtTDAEdh8Ol1b74QW33mMo8gy7lSWgc0YMF3 TCNzXCQgXjIk0FHieB3jEH6DqdJcuvBD41JA7opc1ni+Pjcp/V5ScEXBOPWFKVhf+dEE XnwA== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.61.232 with SMTP id t8mr7422928igr.20.1415397859935; Fri, 07 Nov 2014 14:04:19 -0800 (PST) |
| Date | Sat, 8 Nov 2014 00:04:19 +0200 |
| Subject | dictionary issue for formatted print |
| From | Yusuf Can Bayrak <yusufcanbayrak@gmail.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=047d7bdc05e8a86ddd05074bfecb |
| X-Mailman-Approved-At | Sun, 09 Nov 2014 11:24:21 +0100 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15592.1415528662.18130.python-list@python.org> (permalink) |
| Lines | 68 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1415528662 news.xs4all.nl 2857 [2001:888:2000:d::a6]:43304 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:80414 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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]
>
>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
dictionary issue for formatted print Yusuf Can Bayrak <yusufcanbayrak@gmail.com> - 2014-11-08 00:04 +0200
csiph-web