May I propose:
ifconfig -a | tr '\n' '~' | sed 's/~~/\n/g' | \
sed 's/^\([^ ]*\) .*inet addr:\([0-9.]*\) .*$\|^\([^ ]*\) .*$/\3\1 \2/g'
Output:
eth0 10.0.41.21
eth1
lo 127.0.0.1
Or, if you want to omit any interfaces without IP addresses:
ifconfig -a | tr '\n' '~' | sed 's/~~/\n/g' | grep 'inet addr:' | \
sed 's/^\([^ ]*\) .*inet addr:\([0-9.]*\) .*$/\1 \2/g'
Output:
eth0 10.0.41.21
lo 127.0.0.1
This works by converting all the line breaks to tildes, then converts the double line break between interfaces back into a single line break, so that each interface is on a single line. Then, for every line, it extracts just the wanted pieces of information (interface name and IP address) and replaces the entire line with them.
(Edited since being accepted to accomodate interfaces without IP addresses, per comment below.)